package com.bangcommunity.bbframe.sdm.domain;

import com.bangcommunity.bbframe.common.base.MainConfigLoader;
import lombok.Data;

/**
 * Created by tanghc on 17/1/18.
 */
@Data
public class ClientParam implements IClientParam {

    private static final long serialVersionUID = -1814386602814823064L;
    /**
     * 客户端产品线标识
     */
    private String productCode;
    /**
     * 客户端应用标识
     */
    private String appCode;
    /**
     * 用户发送请求的ip
     */
    private String requestIp;
    /**
     * 当前登录用户
     */
    private String opUid;
    /**
     * oauth中申请的token,或sso时获取的token
     */
    private String token;
    /**
     * 签名
     */
    private String sign;

    /**
     * 创建基本的clientparam
     * 
     * @return
     */
    public static ClientParam createClientParam() {
        ClientParam clientParam = new ClientParam();
        clientParam.setProductCode(MainConfigLoader.getInstance().getProductCode());
        clientParam.setAppCode(MainConfigLoader.getInstance().getAppCode());
        return clientParam;
    }
}
